da90f03f4c7e192a23aaf64680cccf1c51c2b0f5,spring-web-reactive/src/main/java/org/springframework/web/reactive/method/annotation/ResponseBodyResultHandler.java,ResponseBodyResultHandler,supports,#HandlerResult#,120
Before Change
Object handler = result.getHandler();
if (handler instanceof HandlerMethod) {
Method method = ((HandlerMethod) handler).getMethod();
return AnnotatedElementUtils.isAnnotated(method, ResponseBody.class.getName());
}
return false;
}
After Change
if (handler instanceof HandlerMethod) {
MethodParameter returnType = ((HandlerMethod) handler).getReturnType();
Class<?> containingClass = returnType.getContainingClass();
return (AnnotationUtils.findAnnotation(containingClass, ResponseBody.class) != null ||
returnType.getMethodAnnotation(ResponseBody.class) != null);
}
return false;